<?php
	class home extends BaseController{
		public $security_level = SECURITY_LEVEL_USER;
		public function getData($in_params){
			$isAdmin = $_SESSION["user"]["security_level"] >= SECURITY_LEVEL_ADMIN;
			if ($isAdmin && empty($_REQUEST["list"])){
				general::redirect("home?list=warnings");
			}
			$this->template_data["isAdmin"] = $isAdmin;
			
			return;
		}
		
		public function action_getWarningCount($in_param){
			return $_SESSION["warnings"];
		}
	}
?>